import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Subscribe from '@/views/Subscribe'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'main',
      component: Home
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children: [
        {
          path: '/positionList',
          component: () => import('../views/PositionList')
        },
        {
          path: '/keywords',
          component: () => import('../views/Keywords')
        },
        {
          path: '/keywords/form',
          component: () => import('../views/keywordsForm.vue')
        },
        {
          path: '/test',
          component: () => import('../components/FilterBox.vue')
        },
        {
          path: '/subscribe',
          name: 'subscribe',
          component: Subscribe
        }
      ]
    }
  ]
})
